use "$temp/simulated_data_baseline_combined", clear
ren v1 uniqid
ren v2 year
ren v3 mu
ren v4 e
ren v5 m
ren v6 p
ren v7 l
ren v8 age
ren v9 x
ren v10 ac
ren v11 f
ren v12 lp_type
ren v13 h
ren v14 wage
ren v15 l_prime
ren v16 sim
ren v17 age_int
ren v21 tau
ren v22 util
ren v23 c
tab age_int

tab f
tab f if age_int>35
tab f if age_int<36


//let's compute actual fertility rate
gen kid = (f==2)

collapse (sum) kid, by(uniqid sim)
su kid //average number of kids per woman in the data


use "$temp/simulated_data_cfact_natsub_combined", clear
ren v1 uniqid
ren v2 year
ren v3 mu
ren v4 e
ren v5 m
ren v6 p
ren v7 l
ren v8 age
ren v9 x
ren v10 ac
ren v11 f
ren v12 lp_type
ren v13 h
ren v14 wage
ren v15 l_prime
ren v16 sim
ren v17 age_int
ren v21 tau
ren v22 util
ren v23 c
tab age_int

tab f
tab f if age_int>35
tab f if age_int<36


//let's compute actual fertility rate
gen kid = (f==2)

collapse (sum) kid, by(uniqid sim)
su kid //average number of kids per woman in the data





use "$temp/simulated_data_cfact_halfccc_combined", clear
ren v1 uniqid
ren v2 year
ren v3 mu
ren v4 e
ren v5 m
ren v6 p
ren v7 l
ren v8 age
ren v9 x
ren v10 ac
ren v11 f
ren v12 lp_type
ren v13 h
ren v14 wage
ren v15 l_prime
ren v16 sim
ren v17 age_int
ren v21 tau
ren v22 util
ren v23 c
tab age_int

tab f
tab f if age_int>35
tab f if age_int<36

//let's compute actual fertility rate
gen kid = (f==2)

collapse (sum) kid, by(uniqid sim)
su kid //average number of kids per woman in the data




/*
local cfacts "tweakccc"
foreach cfact in `cfacts'{
	import delimited "$dir/Model/simulated_data/simulated_data_cfact_`cfact'_3.csv", clear
	gen race = 2
	tempfile blacks
	save `blacks'
	
	import delimited "$dir/Model/simulated_data/simulated_data_cfact_`cfact'_2.csv", clear
	gen race = 1
	append using `blacks'
	export delimited "$dir/Model/simulated_data/simulated_data_cfact_`cfact'_combined.csv", replace novarn
}
*/






use "$temp/simulated_data_cfact_tweakccc_combined", clear
ren v1 uniqid
ren v2 year
ren v3 mu
ren v4 e
ren v5 m
ren v6 p
ren v7 l
ren v8 age
ren v9 x
ren v10 ac
ren v11 f
ren v12 lp_type
ren v13 h
ren v14 wage
ren v15 l_prime
ren v16 sim
ren v17 age_int
ren v21 tau
ren v22 util
ren v23 c
tab age_int

tab f
tab f if age_int>35
tab f if age_int<36

//let's compute actual fertility rate
gen kid = (f==2)

collapse (sum) kid, by(uniqid sim)
su kid //average number of kids per woman in the data



